package edu.byu.intex2.data.bo;

import edu.byu.intex2.data.DataException;
import edu.byu.intex2.data.dao.NewCarDAO;

/**
 * New Car is a physical car that is not used.
 * @author Brady
 */
public class NewCar extends PhysicalCar {
    private double MSRP;

    /** Creates a new instance of BusinessObject */
    public NewCar(String id) {
        super(id);
    }//constructor

    /** Convenience method to call the correct DAO to save this business object */
    @Override
    public void save() throws DataException {
        try {
            NewCarDAO.getInstance().save(this);
        } catch (DataException e) {
            e.printStackTrace();
        }
    }
    /** @return the MSRP     */
    public double getMSRP() {
        return MSRP;
    }

    /** @param MSRP the MSRP to set     */
    public void setMSRP(double MSRP) {
        this.MSRP = MSRP;
        setDirty();
    }
}
